package name.hankc.spring.bean.autowired;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class DogAC {
  @Value("dogdog")
  private String name;

  private PersonA personA;

  @Autowired
  public DogAC(PersonA personA) {
    this.personA = personA;
  }

  @Override
  public String toString() {
    return "DogA [name=" + name + ", person=" + personA + "]";
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public PersonA getPersonA() {
    return personA;
  }

  public void setPerson(PersonA personA) {
    this.personA = personA;
  }
}
